$(document).ready(function(){
   postData={};
  $.post('/index.php?c=Cart&a=info', postData, function(result){
        if(result.status == 1) {
            // TODO
            // return dialog.success(result.message,result['data']['jump_url']);
            var totalnumber=result['data']['totalnumber'];
            var totalprice=result['data']['totalprice'];
            $('.totalnumber').text(totalnumber);
            $('.totalprice').text(totalprice);
        }
        if(result.status == 0) {
            // TODO
            //return dialog.error(result.message);
        }
    },"json");

$('#cart-delAll').click(function(){

  $.post('index.php?c=Cart&a=delall', {}, function(result){
        if(result.status == 1) {
            window.location.href='';
        }
        if(result.status == 0) {
              window.location.href='';
        }
    },"json");
    
});


});





